Currently, batteries in most of electronic devices are connected with external power adapters via charging interfaces of the electronic devices to realize charging.
During the charging, an impedance of the charging loop may sometimes become abnormal. There are various reasons resulting in the impedance anomaly, such as, a loose contact due to a bad-inserted charging interface, a loose contact between a battery and a connector located at two ends of the battery due to dirt at the two ends of the battery.
In a case that the impedance of the charging loop is abnormal, if the charging is still performed, charging components (such as a battery, a power adapter, and a terminal) will be damaged, thus bringing a hidden danger. In the related art, the impedance anomaly in the charging loop cannot be detected and handled, such that the safety during the charging is poor.